package com.huawei.appmarket.service.externalapi.actions;

import com.huawei.appgallery.foundation.service.common.protocol.AppDetailActivityProtocol;
import com.huawei.appgallery.foundation.service.common.protocol.AppDetailActivityProtocol.Request;
import com.huawei.appmarket.R;
import com.huawei.gamebox.service.common.uikit.protocol.CardListActivityProtocol;
import java.util.LinkedHashMap;
import o.cdz;
import o.cjm;
import o.cjo;
import o.dgh;
import o.Logger;
import o.dyr;
import o.dys.a;

public class CampaignGiftShortCutAction extends dyr {
    private static final String CAMPAIGN_GIFT_COUNTRY_KEY = "country";
    private static final String CAMPAIGN_GIFT_SHORTCUT_KEY = "390201";
    private static final String CAMPAIGN_GIFT_URI_KEY = "URI";
    private static final String OPEN_CAMPAIGN_URI = "shortcutgift";
    private static final String TAG = "CampaignGiftShortCutAction";

    public CampaignGiftShortCutAction(a aVar) {
        super(aVar);
    }

    public void onAction() {
        cjm o_cjm;
        Object obj;
        cjo appDetailActivityProtocol;
        if (cdz.ˏ()) {
            appDetailActivityProtocol = new AppDetailActivityProtocol();
            appDetailActivityProtocol.ˏ(new Request(OPEN_CAMPAIGN_URI, null));
            o_cjm = new cjm("appdetail.activity", appDetailActivityProtocol);
            obj = OPEN_CAMPAIGN_URI;
        } else {
            appDetailActivityProtocol = new CardListActivityProtocol();
            CardListActivityProtocol.Request request = new CardListActivityProtocol.Request();
            request.ˎ("gss|gifts");
            request.ˏ("gifttoawardevent");
            request.ॱ(true);
            request.ˋ((int) R.drawable.welfare_prize_white_selector);
            request.ˎ((int) R.drawable.ic_prize_nor);
            request.ˏ((int) R.drawable.ic_gift_prize_empty);
            request.ˊ((int) R.string.market_prize);
            request.ॱ((int) R.string.gift_area_no_data);
            appDetailActivityProtocol.ˋ(request);
            o_cjm = new cjm("cardlist_activity", appDetailActivityProtocol);
            obj = "gss|gifts";
        }
        this.callback.ˎ(o_cjm, 0);
        this.callback.finish();
        String ˎ = cdz.ˎ();
        Logger.ˎ(TAG, "onAction, homeCountry:" + ˎ);
        LinkedHashMap linkedHashMap = new LinkedHashMap();
        linkedHashMap.put("country", ˎ);
        linkedHashMap.put(CAMPAIGN_GIFT_URI_KEY, obj);
        dgh.ˋ(CAMPAIGN_GIFT_SHORTCUT_KEY, linkedHashMap);
    }
}
